# cd CodingTraining/cpp/opencv/dnn/
# cmake -B build -G "MinGW Makefiles"
# cmake --build build
# .\classification.exe --model=bvlc_googlenet.caffemodel --config=bvlc_googlenet.prototxt --width=224 --height=224 --classes=classification_classes_ILSVRC2012.txt --input=imge01.jpg --mean="104 117 123" --rgb=false

cmake_minimum_required(VERSION 3.24)
# set(APP_NAME classification)
set(APP_NAME dnnDemo)
project(${APP_NAME})
message(STATUS "[Nnnnut] into ${APP_NAME}")

set(OpenCV_DIR "D:\\code\\opencv\\cvBuild")
find_package(OpenCV 4 REQUIRED)
# message("[Nnnnut] OpenCV_INCLUDE_DIRS   ${OpenCV_INCLUDE_DIRS}")
# message("[Nnnnut] OpenCV_LIBS           ${OpenCV_LIBS}")

set(gflags_DIR "D:\\code\\gflags\\lib\\cmake\\gflags")
find_package(gflags REQUIRED)
# message("[Nnnnut] GFLAGS_INCLUDE_DIR    ${GFLAGS_INCLUDE_DIR}")
# message("[Nnnnut] GFLAGS_LIBRARIES      ${GFLAGS_LIBRARIES}")

add_compile_options(-fexec-charset=GBK
                    -DDEBUG)

set(ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/..)
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}) # 设置可执行文件输出路径

add_executable(${APP_NAME} ${APP_NAME}.cpp)
target_include_directories(${APP_NAME}
                            PRIVATE ../../log
                            PRIVATE ${OpenCV_INCLUDE_DIRS}
                            PRIVATE ${GFLAGS_INCLUDE_DIR})
target_link_libraries(${APP_NAME} ${OpenCV_LIBS} ${GFLAGS_LIBRARIES})

